Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local angular distributions #36

Merged
merged 55 commits into from
Dec 11, 2024
Merged

Conversation

Yurlungur
Copy link
Collaborator

PR Summary

Add local angular distributions code in support of neutrino oscillations. This machinery is intended to find electron lepton number crossings. See, e.g.,
https://arxiv.org/abs/2404.17938

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.

@Yurlungur Yurlungur added the enhancement New feature or request label Nov 17, 2024
@Yurlungur Yurlungur self-assigned this Nov 17, 2024
@Yurlungur
Copy link
Collaborator Author

Yurlungur commented Nov 21, 2024

Four species transport now supported. To use do the following:

  1. Clone my fork of NuLib
  2. Modify the file make_example_table.F90 and set mytable_neutrino_scheme to 2 and number_output_species to 4
  3. build with make -j
  4. run the resulting executable make_example_table
  5. NuLib/scripts/table2bhlight.py on the generated hdf5 file
  6. Copy the generated table, which should end with _bhlight.h5 to the location you wish to use for nubhlight
  7. Modify the nublight build.py file or param_template.dat file to point to the file
  8. In the nubhlight build.py file, either add this line bhl.config.set_cparm("RAD_NUM_TYPES", 4) or change RAD_NUM_TYPES to be 4.
  9. build nubhlight and run

Below is the fornax 1 zone equilibrium test run with nue, nuebar, nux, nuxbar:

fornax-equilibrium-comparison

Note that with four species, at fixed particle number, fewer monte carlo packets are carrying electron number, so to get good Ye values, you may need to add roughly 25% more particles.

@Yurlungur
Copy link
Collaborator Author

important paper also for this MR https://arxiv.org/abs/2304.05044

@Yurlungur
Copy link
Collaborator Author

This MR is ready. @kelslund @payelmuk150 please review.

@Yurlungur
Copy link
Collaborator Author

One-zone oscillation test
oscillations_1zone

prob/torus_cbc/build.py Outdated Show resolved Hide resolved
#pragma omp atomic
local_angles[b][ix1][ix2][ph->type][icosth[b]] += ph->w;
#pragma omp atomic
local_stddev[b][ix1][ix2][icosth[b]] += 1.;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standard deviation formula needs to be modified to the more general form

README.md Outdated Show resolved Hide resolved
core/decs.h Outdated Show resolved Hide resolved
core/diag.c Outdated Show resolved Hide resolved
@@ -298,6 +298,9 @@ void diag(int call_code) {
get_time_per_step(TIMER_ALL));
#if ELECTRONS
fprintf(ener_file, "%15.8g ", get_time_per_step(TIMER_ELECTRON));
#endif
#if NEUTRINO_OSCILLATIONS || LOCAL_ANGULAR_DISTRIBUTIONS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between these two conditions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One can compute G, A, B, etc without actually running the oscillations code. So NEUTRINO_OSCILLATIONS requires LOCAL_ANGULAR_DISTRIBUTIONS but not vice versa. Would be sufficient to include only the latter, but I was being careful.

@Yurlungur
Copy link
Collaborator Author

@kelslund thanks for the review! Have you made it through the whole thing? And if so, do you approve? (If so click the "finalize review" button on the top right of the diffs tab and click approve)

prob/torus_cbc/build.py Outdated Show resolved Hide resolved
prob/torus_cbc/build.py Outdated Show resolved Hide resolved
@Yurlungur Yurlungur merged commit 52408d9 into master Dec 11, 2024
1 check passed
@Yurlungur Yurlungur deleted the jmm/local-angular-distributions branch December 11, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants